<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
                
           
               <link rel="stylesheet" href="${resource(dir:'css',file:'buttons.css')}" />
          
                
                
                <link rel="stylesheet" href="${resource(dir:'lib',file:'style.css')}"/>
                
                <link rel="shortcut icon" href="${resource(dir:'lib',file:'favicon.png')}" type="image/x-icon" />
                <tooltip:resources/>
                <title>New tab</title>
                <tooltip:resources/>
                
              
	</head>
        
	<body>

          <g:render id="" template="/layouts/menu"/>
		
                  
			<div id="alerts" style="color:white;padding-left: 200px;padding-top:10px;overflow-x:auto">
                       <h3 style="font-size: 40px;color:white">TvMagazinePlus Alertas</h3><br><br>
                       <div id="alertass">
                          <g:each in="${alerta}">
          <div style="background-color: black;padding-top:15px;padding-bottom:15px;padding-left:15px;width:600px">
                            
                              <bbb style="text-decoration:underline">
                              ${it.program.prog_channel.getChannel2()}&nbsp;&nbsp;-&nbsp;&nbsp; 
                              ${it.program.getProgrammationName()} <br><br></bbb>
                              <b style="font-weight:bold;">Hora do alerta:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${it.horaDispara} <br><br>
                              <b style="font-weight:bold;">Mensagem:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${it.personalMessage} <br><br>
                              <b style="font-weight:bold;">Meio de Envio:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${it.tipo}
                              <br/></br>
                              
          <g:link controller="teste" action="removeAlert" onclick="return confirm('${message(code: 'Are you sure to delete this alert?')}');" params="[temp: it.id]" style="text-align:right"><u>REMOVE</u></g:link>
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            <g:if test="${it.sent == 1 || it.program.prog_start.before(new Date())}">
              <g:link disabled="true" controller="teste" action="myProgramms_alertas" params="[temp: it.id]" style="text-align:right"><u>EDIT</u></g:link>
                   
            </g:if>
            <g:else>
                 <g:link controller="teste" action="editAlert" params="[temp: it.id]" style="text-align:right"><u>EDIT</u></g:link>
                                   
            </g:else>
                                             
          
          
          </div>
                            <br><br>
                          </g:each>
                       </div>
                                
			</div><!-- end wrapper1 -->
                       
                       

	</body>
</html>
